package com.xxx.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class WebConfig {
	
	/**
	 * 文件上传路径
	 */
	public static String uploadPath;
	
	
	//这里需要将自动生成setter的方法的修饰符static去掉，否则spring无法注入
	@Value("${web.upload-path}")
	public void setUploadpath(String uploadPath) {
		WebConfig.uploadPath = uploadPath;
	}
	
}
